package com.sjdang.springcloud.learning.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.sjdang.springcloud.learning.service.HelloService;

@RestController
@RequestMapping("/learning/ribbon")
public class HelloController {
	
	@Resource
	private HelloService helloService;
	
	@GetMapping("/hello")
	public String sayHello(@RequestParam(value="name", defaultValue="SJDANG")String name) {
		return helloService.sayHello(name);
	}

}
